home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 14 / MacFormat n. 14 (Spain) / MacFormat 14.bin / C de cerca / Codewarrior Lite / MacOS Support / Headers / Universal Headers / OSAGeneric.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  4.0 KB  |  123 lines

  1. /*
  2.      File:        OSAGeneric.h
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __OSAGENERIC__
  21. #define __OSAGENERIC__
  22.  
  23.  
  24. #ifndef __ERRORS__
  25. #include <Errors.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __APPLEEVENTS__
  30. #include <AppleEvents.h>
  31. #endif
  32. /*    #include <Types.h>                                            */
  33. /*    #include <Memory.h>                                            */
  34. /*        #include <MixedMode.h>                                    */
  35. /*    #include <OSUtils.h>                                        */
  36. /*    #include <Events.h>                                            */
  37. /*        #include <Quickdraw.h>                                    */
  38. /*            #include <QuickdrawText.h>                            */
  39. /*    #include <EPPC.h>                                            */
  40. /*        #include <AppleTalk.h>                                    */
  41. /*        #include <Files.h>                                        */
  42. /*            #include <Finder.h>                                    */
  43. /*        #include <PPCToolbox.h>                                    */
  44. /*        #include <Processes.h>                                    */
  45. /*    #include <Notification.h>                                    */
  46.  
  47. #ifndef __OSA__
  48. #include <OSA.h>
  49. #endif
  50. /*    #include <AEObjects.h>                                        */
  51. /*    #include <Components.h>                                        */
  52.  
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56.  
  57. #if PRAGMA_ALIGN_SUPPORTED
  58. #pragma options align=mac68k
  59. #endif
  60.  
  61. #if PRAGMA_IMPORT_SUPPORTED
  62. #pragma import on
  63. #endif
  64.  
  65. /*     NOTE:    This interface defines a "generic scripting component."
  66.             The Generic Scripting Component allows automatic dispatch to a
  67.             specific scripting component that conforms to the OSA interface.
  68.             This component supports OSA, by calling AppleScript or some other 
  69.             scripting component.  Additionally it provides access to the default
  70.             and the user-prefered scripting component.
  71. */
  72.  
  73. enum {
  74. /* Component version this header file describes */
  75.     kGenericComponentVersion    = 0x0100
  76. };
  77.  
  78. enum {
  79.     kGSSSelectGetDefaultScriptingComponent = 0x1001,
  80.     kGSSSelectSetDefaultScriptingComponent = 0x1002,
  81.     kGSSSelectGetScriptingComponent = 0x1003,
  82.     kGSSSelectGetScriptingComponentFromStored = 0x1004,
  83.     kGSSSelectGenericToRealID    = 0x1005,
  84.     kGSSSelectRealToGenericID    = 0x1006,
  85.     kGSSSelectOutOfRange        = 0x1007
  86. };
  87.  
  88. typedef OSType ScriptingComponentSelector;
  89.  
  90. typedef OSAID GenericID;
  91.  
  92. /* get and set the default scripting component */
  93. extern pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  94.  FIVEWORDINLINE(0x2F3C, 4, 0x1001, 0x7000, 0xA82A);
  95. extern pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  96.  FIVEWORDINLINE(0x2F3C, 4, 0x1002, 0x7000, 0xA82A);
  97. /* get a scripting component instance from its subtype code */
  98. extern pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  99.  FIVEWORDINLINE(0x2F3C, 8, 0x1003, 0x7000, 0xA82A);
  100. /* get a scripting component selector (subType) from a stored script */
  101. extern pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  102.  FIVEWORDINLINE(0x2F3C, 8, 0x1004, 0x7000, 0xA82A);
  103. /* get a real component instance and script id from a generic id */
  104. extern pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  105.  FIVEWORDINLINE(0x2F3C, 8, 0x1005, 0x7000, 0xA82A);
  106. /* get a generic id from a real component instance and script id */
  107. extern pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  108.  FIVEWORDINLINE(0x2F3C, 8, 0x1006, 0x7000, 0xA82A);
  109.  
  110. #if PRAGMA_IMPORT_SUPPORTED
  111. #pragma import off
  112. #endif
  113.  
  114. #if PRAGMA_ALIGN_SUPPORTED
  115. #pragma options align=reset
  116. #endif
  117.  
  118. #ifdef __cplusplus
  119. }
  120. #endif
  121.  
  122. #endif /* __OSAGENERIC__ */
  123.